package com.keya.pull;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author huangshuqiang
 * @version 1.0
 * @description: TODO
 * @date 2022/8/31 14:15
 */
@NoArgsConstructor
@Data
@Accessors(chain = true)
@ApiModel(value = "DatasourceViewVO", description = "数据源视图对象")
public class DatasourceViewVO implements Serializable {

    @ApiModelProperty(value = "数据源名称")
    private String name = "study_view";

    @NotBlank(message = "数据库jdbc地址不能为空")
    @ApiModelProperty(value = "数据库jdbc地址")
    private String url;

    @NotBlank(message = "用户名不能为空")
    @ApiModelProperty(value = "用户名")
    private String username;

    @NotBlank(message = "密码不能为空")
    @ApiModelProperty(value = "密码")
    private String password;

    @NotNull(message = "设备id不能为空")
    @ApiModelProperty(value = "设备id")
    private Integer deviceId;

    @NotBlank(message = "sql语句不能为空")
    @ApiModelProperty(value = "sql语句")
    private String sql;

    @NotNull(message = "状态不能为空")
    @ApiModelProperty(value = "状态：false-禁用，true-启用")
    private Boolean enabled;
}
